Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Sharpness-awareness industrial defect classification algorithm based on variational feature de-entanglement

  

  • Online:2025-04-08 Published:2025-04-08

基于变分特征解纠缠的锐度感知工业缺陷分类算法

Abstract: Abstract In the field of industrial production, defect classification plays a crucial role in ensuring product quality and safety. However, industrial defect datasets are characterized by large intra-class variations and small inter-class differences, coupled with a limited number of defect samples, which leads to the poor performance of existing defect classification models in actual industrial environments. To address this issue, this paper innovatively proposes a defect classification algorithm for industrial applications based on variational feature disentanglement and sharpness-awareness. Firstly, a variational autoencoder is introduced to disentangle defect features into class-discriminative features and intra-class variance features. Then, the intra-class variance features are enhanced through a resampling strategy and combined with the original features to improve the discriminative power of feature representation. VFD enables the model to focus more on the class-discriminative features of defects while having a certain tolerance for details and backgrounds irrelevant to defect categories, thereby enhancing the defect classification performance of the model. Additionally, by introducing a sharpness-awareness training strategy, the geometric shape of the loss function is optimized, further improving the model's generalization ability. Experiments on the NEU-CLS steel rolling defect dataset, the GC10-DET metal defect dataset, and a self-made fastener defect dataset show that the accuracy of VFD-SA reaches 100%, 93.52%, and 99.48% respectively, significantly outperforming existing defect classification algorithms and fully meeting the defect classification requirements in various industrial scenarios.

摘要: 摘 要 在工业生产领域,缺陷分类对于保障产品质量和安全性扮演着至关重要的角色。但工业缺陷数据集存在类内差异大、类间差异小的特性,加上缺陷样本数量有限,致使现有缺陷分类模型在实际工业环境中的表现欠佳。针对这一问题,本文创新性地提出了基于变分特征解缠和锐度感知的工业缺陷分类算法。首先,引入变分自编码器将缺陷特征解缠为类别判别特征和类内方差特征,然后通过重采样策略增强类内方差特征,与原始特征结合以提升特征表示的区分度,VFD使模型能够更加专注于缺陷的类别判别特征,同时对与缺陷类别无关的细节和背景具有一定的容忍度,进而提高模型的缺陷分类性能。此外,通过引入锐度感知训练策略,优化损失函数的几何形状,进一步提升了模型的泛化能力。在轧钢缺陷数据集 NEU-CLS、金属缺陷数据集GC10-DET和自制紧固件缺陷数据集上的实验显示,VFD-SA的准确率分别达到100%、93.52%和99.48%,显著超越现有缺陷分类算法,能够充分满足各类工业场景下缺陷分类的需求。